<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf模板学习</title>
</head>
<body>
<h1>
    msg: <span th:text="${msg}"></span>
</h1>
<h2 th:text="${user.name}"></h2>
欢迎: <span th:text="${user.name}"></span> 来学习thyleaf 模板!
<br>
<span th:text="'<font color=\'red\' >hello world</font>'"></span>
<br>
<span th:utext="'<font color=\'red\' >hello world</font>'"></span>

<br>
<span th:text="${#dates.format(#dates.createNow(),'yyyy-MM-dd') }"></span>
</body>

<script th:inline="javascript">
    const user = /*[[${user}]]*/{};

    console.log(user);
</script>
</html>